﻿// // ******************************************************************
// //       /\ /|       @file       JellyfinCommandHandler.cs
// //       \ V/        @brief      await29
// //       | "")       @author     Await, 285283010@qq.com
// //       /  |
// //      /  \\        @Modified   2024-11-10 16:11
// //    *(__\_\        @Copyright  Copyright (c) , 2024-11-10 10:11 Await
// // ******************************************************************

using AutomaticSubtitles.Service.Application.Jellyfin.Queries.Auth;
using AutomaticSubtitles.Service.Domain.Config;

namespace AutomaticSubtitles.Service.Application.Jellyfin;

public class JellyfinCommandHandler(IConfigDataRepository repository) : BaseAutoService
{
    [EventHandler]
    public async Task Handle(JellyfinAuthCommand command)
    {
        var autoConfig = await repository.FindAsync(x => x.Id == command.id);
        if (autoConfig == null)
            throw new ArgumentNullException(ReturnMessage(NoExistent));


        command.Result = "";
    }
}